# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: CUI Hao <cuihao.leo at gmail dot com>
# Contributor: Kandu <1123monkey at 163 dot com>

pkgname=zh-autoconvert
pkgver=0.3.16
pkgrel=5
pkgdesc="An intelligent Chinese Encoding converter"
url="https://code.google.com/archive/p/libhz/"
license=('LGPL')
arch=('loong64' 'x86_64')
depends=('glibc')
source=(https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/libhz/${pkgname}-${pkgver}.tar.gz
        autoconvert.patch)
sha512sums=('1d3800ebebce3d24d701b497d33d27cf292785c87b8a49e4af808ea8ba0c052afec1e7fb80950322f9ae93fe0f0ea2c881a3f869fc979d7fa545139fa2d5514a'
            '4af5720dddfb6240d2b6f2ea999dbb85212ea4d5cba8f783fd71feb0b1346c05a0e3e72167db2712d30a8d1712ff9a77be4f99bce936ead2357aea7cedcc2b37')

build() {
  cd "${srcdir}/autoconvert-${pkgver}"

  patch -Np1 -i ../autoconvert.patch
  make
}

package() {
  cd "${srcdir}/autoconvert-${pkgver}"
  make DESTDIR="${pkgdir}" install
}
